/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package PuriON_Chat;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;
import java.util.Vector;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author goajang
 */



public class PURION_Chat implements Runnable
{

    public Vector cSocketList;
    ServerSocket sSocket = null;
    
    public PURION_Chat()
    {
        try {
            sSocket = new ServerSocket(20006);
            cSocketList = new Vector();
            
        } catch (IOException ex) {
            Logger.getLogger(PURION_Chat.class.getName()).log(Level.SEVERE, null, ex);
        }
        
        System.out.println("list setup");
        
    }
    
    public Vector getVector()
    {
        return cSocketList;
    }
    
    public void run() {
        
        
        while(true)
        {
            try {
                    Socket x = sSocket.accept();
                    
                    cSocketList.add(x);
                    
                    
                    System.out.println("list" + x);

            } catch (IOException ex) {
                Logger.getLogger(PURION_Chat.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        
        
        
        
    }
}
